package com.daiyang.common;

import com.daiyang.common.utils.SecurityUtil;
import com.daiyang.pojo.UserInfoRegisterRequest;
import com.daiyang.pojo.dataobject.UserInfo;

public class BeanConvert {
    public static UserInfo convertUserInfoEncrypt(UserInfoRegisterRequest
                                                          request){
        UserInfo userInfo = new UserInfo();
        userInfo.setUserName(request.getUserName());
        userInfo.setPassword(SecurityUtil.encrypt(request.getPassword()));
        userInfo.setGithubUrl(request.getGithubUrl());
        userInfo.setEmail(request.getEmail());
        return userInfo;
    }
}
